package com.innovation.chengzhangriji.http;

import com.google.gson.annotations.SerializedName;
import com.innovation.library.http.InnovationRequestBody;

public class PhotoUploadRequest extends BaseUploadRequest {

    public static final String PATH = BaseRequest.PATH + "api/post_photo_album";

    private String theme;

    private String text;

    private String[] urls;

    public String getTheme() {
        return theme;
    }

    public void setTheme(String theme) {
        this.theme = theme;
    }

    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    public String[] getUrls() {
        return urls;
    }

    public void setUrls(String[] urls) {
        this.urls = urls;
    }

    @Override
    protected InnovationRequestBody getInnovationRequestBody() {
        PictureUploadRequestBody body = new PictureUploadRequestBody();
        body.setPhone(getPhone());
        body.setToken(getToken());
        body.setUuid(getUuid());
        body.setBabyID(getBabyID());
        body.setTheme(getTheme());
        body.setText(getText());
        body.setUrls(getUrls());
        body.setLabel(getLabel());
        body.setLabelId(getLabelId());
        body.setCreateTS(getCreateTS());
        return body;
    }

    private class PictureUploadRequestBody extends BaseUploadRequestBody {

        @SerializedName("Theme")
        private String theme;

        @SerializedName("Text")
        private String text;

        @SerializedName("Photos")
        private String[] urls;

        private PictureUploadRequestBody() {
            setSv(BaseRequestConfig.SV_PICTURE_UPLOAD);
        }

        public String getTheme() {
            return theme;
        }

        public void setTheme(String theme) {
            this.theme = theme;
        }

        public String getText() {
            return text;
        }

        public void setText(String text) {
            this.text = text;
        }

        public String[] getUrls() {
            return urls;
        }

        public void setUrls(String[] urls) {
            this.urls = urls;
        }
    }

}
